package com.android.goal;

import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONTokener;

public class Highlight {
	private double minute;
	private String player, sub_player, kind;
	private int IDMatch;
	
	public Highlight(){
		player = null;
		sub_player = null;
		kind = null;
		IDMatch = 0;
		minute = 0.0;
	}
	
	public Highlight(JSONObject json){
		this.parseInfo(json);
	}

	public void parseInfo(JSONObject object){
		try {									
			this.player = object.getString("player");
			this.sub_player = object.getString("sub_player");
			this.kind = object.getString("kind");
			this.minute = object.getDouble("minute");
			this.IDMatch = object.getInt("IDMatch"); 
		} catch (JSONException e) {
			e.printStackTrace();
		}		
	}
	
	public String getPlayer(){
		return this.player;
	}
	
	public String getSubPlayer(){
		return this.sub_player;
	}
	
	public Double getMinute(){
		return this.minute;
	}
	
	public String toString(){
		return "";
	}	
}
